using Brilliant_see.App.ViewModels;
using Brilliant_see.Core.AbstractClass;
using Brilliant_see.Core.structs;

namespace Brilliant_see.UI.Views;

public partial class ComicBrowsePage : ContentPage
{
    private readonly ComicBrowseViewModel _viewModel;

    public ComicBrowsePage(ComicBrowseViewModel viewModel)
    {
        this.BindingContext = viewModel;
        _viewModel = viewModel;

        InitializeComponent();
    }

    public void SetComicOrChapter(Comic comic, ref Chapter chapter)
        => _viewModel.SetComicOrChapter(comic, ref chapter);
}